package com.ybkj.o2o.zhuanxian.service;

import com.ybkj.o2o.zhuanxian.common.CompanyOrderVo;
import com.ybkj.o2o.zhuanxian.common.DriverOrderDetailVo;
import com.ybkj.o2o.zhuanxian.common.DriverOrderVo;
import com.ybkj.o2o.zhuanxian.common.MemberOrderVo;
import com.ybkj.o2o.zhuanxian.common.OrderFromSourceVo;
import com.ybkj.o2o.zhuanxian.common.PageVo;
import com.ybkj.o2o.zhuanxian.common.chart.ChartDay;
import com.ybkj.o2o.zhuanxian.common.chart.ChartMonth;
import com.ybkj.o2o.zhuanxian.common.chart.ChartYear;
import com.ybkj.o2o.zhuanxian.common.chart.HourChart;
import com.ybkj.o2o.zhuanxian.entity.Order;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderService {
  void insertCycleRecord(Map<String,Object> map);

  List<Map<String,Object>> redPacketCycle(Date orderDate,String cycle);

  List<Order> cycleOrder(Date startDate, Date endDate);

  int insert(Order order);

  Order findByIdAndAppKey(Long orderId, String appKey);

  int update(Order order);

  List<Order> findOrderByEmployId(Long employId, Double money, String appKey, Long startTime,
      Long endTime);

  List<Order> findByParam(Date start, Date end, Long companyId, String companyName, String orderNo,
      Long passengerId, String passengerName, String passengerPhone, Long employId,
      String employName, String employPhone, String carNumber, String orderby,
      List<String> allorderType, List<Integer> allstatus, Integer rows, Integer offset,
      Boolean treatment, Date startFinish, Date endFinish, Long lineId, String appKey, Long[] linesId);

  Long countByParam(Date start, Date end, Long companyId, String companyName, String orderNo,
      Long passengerId, String passengerName, String passengerPhone, Long employId,
      String employName, String employPhone, String carNumber, String orderby,
      List<String> allorderType, List<Integer> allstatus, Boolean treatment, Date startFinish,
      Date endFinish, Long lineId, String appKey, Long[] linesId);

  int updateIngoreNull(Order order);

  Long countFinishByPassenger(Long passengerId, Date startTime, Date endTime, String appKey,
      List<String> channelNames);

  int addmore(Order order);

  long countForToday(String appKey);

  List<Order> findMyFinishOrder(Long passengerId, String appKey);

  ChartYear dataForYear(Integer year, Long companyId, String appKey);

  ChartMonth dataForMonth(Integer year, Integer month, Long companyId, String appKey);

  ChartDay dataForChartDay(Integer year, Integer month, int day, Long companyId, String appKey);

  HourChart dataForhour(Integer year, Integer month, Integer day, int hour, Long companyId,
      String appKey);

  Order findByDriverAndFinishTime(Long employId, Date start, Date end, String appKey);

  List<Order> findMonthOrder(Integer year, Integer month, String appKey);

  PageVo<MemberOrderVo> findMemberOrder(Date startTime,
      Date endTime, Long companyId, String appKey);

  PageVo<OrderFromSourceVo> orderFromSource(Date date1, Date date2, Long companyId, String appKey);

  PageVo<DriverOrderVo> driverAchievement(Date date1, Date date2, Long empCompanyId, String appKey);

  PageVo<CompanyOrderVo> companyOrder(Date date1, Date date2, String appKey);

  PageVo<DriverOrderDetailVo> driverOrderDetailVo(Long driverId, Date start, Date end,
      Integer page, Integer rows, String appKey);

  List<Order> queryFinishOrderByEmployId(Long employId, Long start, Long end, Integer page,
      Integer rows, String appKey);

  Long countFinishOrderByEmployId(Long employId, Long start, Long end, String appKey);

  Long countByPassengerId(Long passengerId, String appKey);

  Long countRunning(Long passengerId, String appKey);

  List<Order> selectActivedByEmploy(Long employId, String appKey);

  List<Order> selectNewOrder(Long companyId, String appKey);

  List<Order> findRunOrderByEmployId(Long employId, Boolean treatment, String appKey);

  Long queryRunOrder(Long passengerId, String appKey);

  List<Order> findHastenOrder(String appKey);

  List<Order> findUnexecutedByEmployId(Long employId, String appKey);

  List<Order> findOrderByPassenger(Long passengerId, Integer offset, Integer rows, String appKey);

  Long countOrderByPassengerId(Long passengerId, String appKey);

  List<Order> findByWork(Long employId, List<Integer> statusList, String appKey);

  List<Order> findRunOrderByLineId(Long lineId, String appKey);

  List<Order> findRunOrderByCarId(Long carId, String appKey);

  List<Order> findJiedanOrderByEmployId(Long employId, String appKey);

  int prepare(Long orderId, String appKey);

  Long driverOrderDetailCount(Long employId, Date startDate, Date endDate, String appKey);

  int updateAnonymousNumber(Long orderId, String appKey, String anonymousNumber);
}
